#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QStack>
#include <vector>
#include <exception>
#include "calculateur.h"
#include "historique.h"

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow {
    Q_OBJECT
public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();

protected:
    void changeEvent(QEvent *e);

private:
    Ui::MainWindow *ui;
    History history;
    StackAdaptor mystack;
    inline void update();
    int print;

public slots :

void stackSwap();
void setPrint(int);
void stackSum();
void stackMean();
void stackDup();
void stackDrop();
void editLine();
void operate();
void remove();
void clear();
void undo();
void redo();
void showdetails(bool);
};

#endif // MAINWINDOW_H
